package mysgoog.pattern;

import mysgoog.bot.Config;
import mysgoog.gtp.Vertex;
/**
* @author Fu, Zhongyang
*/
public class VertexValue {
	public Vertex vertex;
	public int value;
	public VertexValue(Vertex vertex, int value){
		this.vertex = vertex;
		this.value = value;
	}
	
	public VertexValue(int x, int y, int value){
		this.vertex = new Vertex(x,y);
		this.value = value;
	}	
	
	public VertexValue(int pos, int value){
		this.vertex = new Vertex(Config.getEmptyBoard().posX(pos), Config.getEmptyBoard().posY(pos));
		this.value = value;
		String a;		
	}
	
	public boolean equals(Object o){
		if (!(o instanceof VertexValue)) return false;
		VertexValue v = (VertexValue)o;
		if ((this.vertex.equals(v)) && (this.value == v.value)) return true;
		return false;
	}
}
